<?php

namespace app\Modules\Api\models;

use Yii;
use app\models\Addr as BaseModel;

/**
 * LoginForm is the model behind the login form.
 *
 * @property user|null $user This property is read-only.
 *
 */
class Addr extends BaseModel
{
    public function fields()
    {
        $fields = parent::fields();
        $strvalfields = [
            'addrid',
            'user_id',
            'state',
        ];

        foreach($strvalfields as $strvalfield){
            $fields[$strvalfield] = function() use ($strvalfield){
                return strval($this->$strvalfield);
            };
        }

        return $fields;
    }
}